﻿<%@ Page Language="C#" MasterPageFile="~/GUIMaster.Master" AutoEventWireup="true"
    CodeBehind="userProfile.aspx.cs" Inherits="GUI.userProfile" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <link href="../master/resourcesNew/rating.css" rel="stylesheet" type="text/css" />

    <script src="../Messages/smileys.js" type="text/javascript"></script>

    <link rel="stylesheet" href="../stats/stats.css" type="text/css" />

    <script type="text/javascript" language="javascript">
  $(document).ready(function(){
     $("#ctl00_ContentHomePage_SendMess").click(function () {
      $("div#statsMainContainer").slideToggle("slow")
    });
   $("a.ViewSmileys").click(function () {
      $("div#SmileysContent").slideToggle("slow")
    });
        addListSmile();
  });
    </script>

    <style type="text/css">
        .ViewSmileys
        {
            /* for jquery (view smileys) */
        }
        #SmileysContent
        {
            background: transparent url(../stats/resources/overlayBackground.png) repeat;
            position: absolute;
            left: 563px;
            top: 95px;
            display: none;
        }
        .PanelSendPM
        {
            background-image: url(../Messages/h1mess2.png);
            background-repeat: no-repeat;
            background-position: 460px top;
            padding-top: 50px;
            padding-bottom: 10px;
            text-align: left;
        }
        a.ViewSmileys
        {
            text-decoration: none;
            color: #638010;
        }
        a.ViewSmileys:link
        {
            color: #638010;
        }
        a.ViewSmileys:visited
        {
            color: #85BA02;
        }
        a.ViewSmileys:active
        {
            color: #85BA02;
        }
        a.ViewSmileys:hover
        {
            color: #187418;
        }
        #div_title
        {
            height: 152px;
        }
       </style>

    <script language="JavaScript" type="text/javascript">
  //Script for scroll comment of feedbacks
   
            timerDown=""  
            timerUp="" 
            
            var speed = 35; 
            
            var defaultStep = 1;
            var step = defaultStep;  
                                    
            function set_speed()
            {
                var e = document.getElementById("ctl00_ContentHomePage_DropDownList_Comment");
                var strUser = e.options[e.selectedIndex].value;
                if(strUser == 1){step = 7;}
                if(strUser == 2){step = 3;}
                if(strUser == 3){step = 1;}
            }

            function scrollDivDown(id){ 
            document.getElementById(id).scrollTop+=step  
            timerDown=setTimeout("scrollDivDown('"+id+"')",step) 

            }  

            function scrollDivUp(id){ 
            document.getElementById(id).scrollTop-=step  
            timerUp=setTimeout("scrollDivUp('"+id+"')",step) 
            }  

            function stopMe(){ 
            clearTimeout(timerDown)  
            clearTimeout(timerUp) 
            } 

    </script>

</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentHomePage" runat="server">
    <div id="div_title">
        <div id="lbl_title">
            <h1>
                <asp:Label ID="Label_UserProfile" meta:resourcekey="lblUserProfile" runat="server"></asp:Label>
            </h1>
        </div>
        <div id="av">
            <div id="content_avatar_drag">
                <asp:Panel ID="contentPanel" runat="server">
                    <asp:Panel ID="headerPanel" runat="server">
                        <div id="header_avatar">
                        </div>
                        <div id="content_avatar">
                            <asp:Image ID="img_avatar" runat="server" Height="120px" Width="150px"/>
                        </div>
                        <div id="footer_avatar">
                        </div>
                    </asp:Panel>
                </asp:Panel>
                <cc1:DragPanelExtender ID="DragPanelExtender2" runat="server" TargetControlID="contentPanel"
                    DragHandleID="headerPanel" />
            </div>
        </div>
    </div>
    <div id="details_high">
        <ol style="list-style: none;">
            <li>
                <asp:Label ID="Label_UserNickT" meta:resourcekey="lblUserNick" runat="server" CssClass="label_title"></asp:Label>
                <asp:Label ID="Label_UserNick" runat="server"></asp:Label></li>
            <li>
                <asp:Label ID="Label_GenderT" meta:resourcekey="lblGender" runat="server" CssClass="label_title"></asp:Label>
                <asp:Label ID="Label_Male" meta:resourcekey="lblMale" runat="server"></asp:Label>
                <asp:Label ID="Label_Female" meta:resourcekey="lblFemale" runat="server"></asp:Label>
            </li>
            <li>
                <asp:Label ID="Label_SmokerT" meta:resourcekey="lblSmoker" runat="server" CssClass="label_title"></asp:Label>
                <asp:Label ID="Label_Smoker_Yes" meta:resourcekey="lblSmokerYes" runat="server"></asp:Label>
                <asp:Label ID="Label_Smoker_No" meta:resourcekey="lblSmokerNo" runat="server"></asp:Label>
                <asp:Label ID="Label_Smoker_Unknown" meta:resourcekey="lblSmokerUnknown" runat="server"></asp:Label>
            </li>
            <li>
                <cc1:Accordion ID="MyAccordion" runat="Server" SelectedIndex="3" HeaderCssClass="accordionHeader"
                    HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent"
                    AutoSize="None" FadeTransitions="true" TransitionDuration="250" FramesPerSecond="40"
                    RequireOpenedPane="false" SuppressHeaderPostbacks="true">
                    <Panes>
                        <cc1:AccordionPane ID="AccordionPane" HeaderCssClass="accordionHeader" runat="Server"
                            HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent">
                            <Header>
                                <asp:Label ID="Label_FeedbacksT" Text="Feedbacks: " runat="server" CssClass="label_title"></asp:Label><asp:Label
                                    ID="Label_FeedbacksNumber" runat="server" CssClass="label_title"></asp:Label>
                                <div style="height: 21px;">
                                    <cc1:Rating ID="Rating_Feedbacks" runat="server" MaxRating="10" StarCssClass="ratingStar"
                                        WaitingStarCssClass="savedRatingStar" FilledStarCssClass="filledRatingStar" EmptyStarCssClass="emptyRatingStar"
                                        ReadOnly="true" />
                                    <br />
                                </div>
                            </Header>
                            <Content>
                                <div style="margin-bottom: 1%; margin-top: 1%; padding-left: 4%;">
                                    <asp:Label ID="Label_General_PunctualityT" meta:resourcekey="lblGeneralPunctuality"
                                        runat="server" CssClass="label_title"></asp:Label>
                                    <asp:Label ID="Label_General_Punctuality" runat="server"></asp:Label>
                                    <br />
                                    <asp:Label ID="Label_General_ReliabilityT" meta:resourcekey="lblGeneralReliability"
                                        runat="server" CssClass="label_title"></asp:Label>
                                    <asp:Label ID="Label_General_Reliability" runat="server"></asp:Label>
                                </div>
                            </Content>
                        </cc1:AccordionPane>
                        <cc1:AccordionPane ID="AccordionPane1" HeaderCssClass="accordionHeader" runat="Server"
                            HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent">
                            <Header>
                                <br />
                                <asp:Label ID="Label_DriverFeedbacksT" meta:resourcekey="lblDriverFeedbacks" runat="server"
                                    CssClass="label_title"></asp:Label><asp:Label ID="Label_DriverFeedbacksNumber" runat="server"
                                        CssClass="label_title"></asp:Label><br />
                                <div style="height: 21px;">
                                    <cc1:Rating ID="Rating_DriverFeedbacks" runat="server" MaxRating="10" StarCssClass="ratingStar"
                                        WaitingStarCssClass="savedRatingStar" FilledStarCssClass="filledRatingStar" EmptyStarCssClass="emptyRatingStar"
                                        ReadOnly="true" />
                                    <br />
                                </div>
                            </Header>
                            <Content>
                                <div style="margin-bottom: 1%; margin-top: 1%; padding-left: 4%;">
                                    <asp:Label ID="Label_Driver_PunctualityT" meta:resourcekey="lblDriverPunctuality"
                                        runat="server" CssClass="label_title"></asp:Label>
                                    <asp:Label ID="Label_Driver_Punctuality" runat="server"></asp:Label>
                                    <br />
                                    <asp:Label ID="Label_Driver_ReliabilityT" meta:resourcekey="lblDriverReliability"
                                        runat="server" CssClass="label_title"></asp:Label>
                                    <asp:Label ID="Label_Driver_Reliability" runat="server"></asp:Label>
                                    <br />
                                    <asp:Label ID="Label_Driver_KindnessT" meta:resourcekey="lblDriverKindness" runat="server"
                                        CssClass="label_title"></asp:Label>
                                    <asp:Label ID="Label_Driver_Kindness" runat="server"></asp:Label>
                                </div>
                            </Content>
                        </cc1:AccordionPane>
                        <cc1:AccordionPane ID="AccordionPane2" HeaderCssClass="accordionHeader" runat="Server"
                            HeaderSelectedCssClass="accordionHeaderSelected" ContentCssClass="accordionContent">
                            <Header>
                                <br />
                                <asp:Label ID="Label_PassengersFeedbacksT" meta:resourcekey="lblPassengersFeedbacks"
                                    runat="server" CssClass="label_title"></asp:Label><asp:Label ID="Label_PassengerFeedbacksNumber"
                                        runat="server" CssClass="label_title"></asp:Label>
                                <br />
                                <div style="height: 21px;">
                                    <cc1:Rating ID="Rating_PassengersFeedbacks" runat="server" MaxRating="10" StarCssClass="ratingStar"
                                        WaitingStarCssClass="savedRatingStar" FilledStarCssClass="filledRatingStar" EmptyStarCssClass="emptyRatingStar"
                                        ReadOnly="true" />
                                    <br />
                                </div>
                            </Header>
                            <Content>
                                <div style="margin-bottom: 1%; margin-top: 1%; padding-left: 4%;">
                                    <asp:Label ID="Label_Passenger_PunctualityT" meta:resourcekey="lblPassengerPunctuality"
                                        runat="server" CssClass="label_title"></asp:Label>
                                    <asp:Label ID="Label_Passenger_Punctuality" runat="server"></asp:Label>
                                    <br />
                                    <asp:Label ID="Label_Passenger_ReliabilityT" meta:resourcekey="lblPassengerReliability"
                                        runat="server" CssClass="label_title"></asp:Label>
                                    <asp:Label ID="Label_Passenger_Reliability" runat="server"></asp:Label>
                                </div>
                            </Content>
                        </cc1:AccordionPane>
                    </Panes>
                </cc1:Accordion>
                <br />
            </li>
            <li>
                <asp:Label ID="Label_AgeT" meta:resourcekey="lblAge" runat="server" CssClass="label_title"></asp:Label>
                <asp:Label ID="Label_Age" runat="server" Text=""></asp:Label>
            </li>
        </ol>
    </div>
    <div id="feedback_profile">
        <asp:Label ID="Label_FeebackT" meta:resourcekey="lblFeedBack" runat="server" CssClass="Title_User_Profile"></asp:Label>
        <div id="li_header">
        </div>
        <div id="li" style="overflow: hidden; height: 200px;">
            <asp:DataList ID="List_Feedbacks" runat="server" RepeatLayout="Flow">
                <HeaderTemplate>
                </HeaderTemplate>
                <ItemTemplate>
                    <div id="cont" style="height: 40px; width: 380px;">
                        <a href='<%# string.Format("/secure/userProfile.aspx?Nick={0}", Eval("senderNickname")) %>'>
                            <%#DataBinder.Eval(Container.DataItem, "senderNickname")%></a>
                        <%#DataBinder.Eval(Container.DataItem, "commentLeft")%>
                    </div>
                </ItemTemplate>
            </asp:DataList>
        </div>
        <div id="li_footer">
        </div>
        <asp:Image ID="inpUp" runat="server" ImageUrl="~/master/resourcesNew/img/bt_ud_def.png"
            onmouseover="scrollDivUp('li');" onmouseout="stopMe();" Visible="false" />
        <asp:Image ID="inpDown" runat="server" ImageUrl="~/master/resourcesNew/img/bt_down_def.png"
            onmouseover="scrollDivDown('li');" onmouseout="stopMe();" Visible="false" />
        <asp:Label ID="Label_Speed" meta:resourcekey="lblSpeed" runat="server" CssClass="label_title"
            Visible="false"></asp:Label>
        <asp:DropDownList ID="DropDownList_Comment" runat="server" Visible="false" CssClass="button_generics">
            <asp:ListItem Value="1" meta:resourcekey="lblSpeedHigh"></asp:ListItem>
            <asp:ListItem Value="2" meta:resourcekey="lblSpeedMedium"></asp:ListItem>
            <asp:ListItem Selected="True" Value="3" meta:resourcekey="lblSpeedSlow"></asp:ListItem>
        </asp:DropDownList>
    </div>
    <div id="details_medium">
        <ol style="list-style: none;">
            <li>
                <asp:Label ID="Label_BirthdayT" meta:resourcekey="lblBirthday" runat="server" CssClass="label_title"></asp:Label>
                <asp:Label ID="Label_Birthday" runat="server" Text=""></asp:Label>
            </li>
            <li>
                <asp:Label ID="Label_CityT" meta:resourcekey="lblCity" runat="server" CssClass="label_title"></asp:Label>
                <asp:Label ID="Label_City" runat="server" Text=""></asp:Label>
            </li>
            <li>
                <asp:Label ID="Label_AddressT" meta:resourcekey="lblAddress" runat="server" CssClass="label_title"></asp:Label>
                <asp:Label ID="Label_Address" runat="server" Text=""></asp:Label>
            </li>
            <li>
                <asp:Label ID="Label_NameT" meta:resourcekey="lblName" runat="server" CssClass="label_title"></asp:Label>
                <asp:Label ID="Label_Name" runat="server" Text=""></asp:Label>
            </li>
            <li>
                <asp:Label ID="Label_SurnameT" meta:resourcekey="lblSurname" runat="server" CssClass="label_title"></asp:Label>
                <asp:Label ID="Label_Surname" runat="server" Text=""></asp:Label>
            </li>
            <li>
                <asp:Label ID="Label_EmailT" meta:resourcekey="lblEmail" runat="server" CssClass="label_title"></asp:Label>
                <asp:Label ID="Label_Email" runat="server" Text=""></asp:Label>
            </li>
            <li>
                <asp:DataList ID="List_SocialNetworks" runat="server">
                    <HeaderTemplate>
                        <asp:Label ID="Label_SocialNetworksT" meta:resourcekey="lblSocialNetworks" runat="server"
                            CssClass="label_title"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <div style="padding-left: 15%;">
                            <asp:Label ID="social_network" runat="server"> <%#DataBinder.Eval(Container.DataItem, "Name")%></asp:Label>
                        </div>
                    </ItemTemplate>
                </asp:DataList>
            </li>
            <li>
                <asp:Label ID="Label_VehiclesT" meta:resourcekey="lblVehicles" runat="server" CssClass="label_title"></asp:Label>
                <asp:Label ID="Label_No_Vehicles" meta:resourcekey="lblNoVehicles" runat="server"
                    Visible="false"></asp:Label>
                <asp:Label ID="Label_Utilitary" meta:resourcekey="lblUtilitary" runat="server" Visible="false"></asp:Label>
                <asp:Label ID="Label_Sedan" meta:resourcekey="lblSedan" runat="server" Visible="false"></asp:Label>
                <asp:Label ID="Label_Sport" meta:resourcekey="lblSport" runat="server" Visible="false"></asp:Label>
                <asp:Label ID="Label_Suv" meta:resourcekey="lblSuv" runat="server" Visible="false"></asp:Label>
                <asp:Label ID="Label_Multipurpose" meta:resourcekey="lblMultipurpose" runat="server"
                    Visible="false"></asp:Label>
                <asp:Label ID="Label_Motorbike" meta:resourcekey="lblMotorbike" runat="server" Visible="false"></asp:Label>
            </li>
        </ol>
    </div>
    <div id="user_stats">
        <div id="user_stat" runat="server">
            <asp:Label ID="Label_StatsT" meta:resourcekey="lblStats" runat="server" CssClass="Title_User_Profile"></asp:Label>
            <ol style="list-style: none; padding-left: 0;">
                <li>
                    <asp:Label ID="Label_Total_KmT" meta:resourcekey="lblTotalKm" runat="server" CssClass="label_title"></asp:Label>
                    <asp:Label ID="Label_Total_Km" runat="server" Text=""></asp:Label>
                </li>
                <li>
                    <asp:Label ID="Label_Money_SavedT" meta:resourcekey="lblMoneySaved" runat="server"
                        CssClass="label_title"></asp:Label>
                    <asp:Label ID="Label_Money_Saved" runat="server" Text=""></asp:Label>
                </li>
                <li>
                    <asp:Label ID="Label_Fuel_SavedT" meta:resourcekey="lblLabelFuelSaved" runat="server"
                        CssClass="label_title"></asp:Label>
                    <asp:Label ID="Label_Fuel_Saved" runat="server" Text=""></asp:Label>
                </li>
                <li>
                    <asp:Label ID="Label_Total_Pollution_SavedT" meta:resourcekey="lblTotalPollutionSaved"
                        runat="server" CssClass="label_title"></asp:Label>
                    <asp:Label ID="Label_Total_Pollution_Saved" runat="server" Text=""></asp:Label>
                </li>
                <li>
                    <asp:Label ID="Label_Proposed_Trips_NumberT" meta:resourcekey="lblProposedTripsNumber"
                        runat="server" CssClass="label_title"></asp:Label>
                    <asp:Label ID="Label_Proposed_Trips_Number" runat="server" Text=""></asp:Label>
                </li>
                <li>
                    <asp:Label ID="Label_Driver_Trips_NumberT" meta:resourcekey="lblDriverTripsNumber"
                        runat="server" CssClass="label_title"></asp:Label>
                    <asp:Label ID="Label_Driver_Trips_Number" runat="server" Text=""></asp:Label>
                </li>
                <li>
                    <asp:Label ID="Label_Passenger_Trips_NumberT" meta:resourcekey="lblPassengerTripsNumber"
                        runat="server" CssClass="label_title"></asp:Label>
                    <asp:Label ID="Label_Passenger_Trips_Number" runat="server" Text=""></asp:Label>
                </li>
                <li>
                    <asp:Label ID="Label_Max_Passenger_CarriedT" meta:resourcekey="lblMaxPassengerCarried"
                        runat="server" CssClass="label_title"></asp:Label>
                    <asp:Label ID="Label_Max_Passenger_Carried" runat="server" Text=""></asp:Label>
                </li>
                <li>
                    <asp:Label ID="Label_Total_Passnger_CarriedT" meta:resourcekey="lblTotalPassengerCarried"
                        runat="server" CssClass="label_title"></asp:Label>
                    <asp:Label ID="Label_Total_Passnger_Carried" runat="server" Text=""></asp:Label>
                </li>
            </ol>
        </div>
    </div>
    <div id="details_low">
        <ol style="list-style: none;">
            <li>
                <asp:Label ID="Label_PhoneNumberT" meta:resourcekey="lblPhoneNumber" runat="server"
                    CssClass="label_title"></asp:Label>
                <asp:Label ID="Label_PhoneNumber" runat="server" Text=""></asp:Label>
            </li>
            <li>
                <asp:DataList ID="List_Interest" runat="server">
                    <HeaderTemplate>
                        <asp:Label ID="Label_InterestsT" meta:resourcekey="lblInterests" runat="server" CssClass="label_title"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <div style="padding-left: 15%;">
                            <asp:Label ID="interest" runat="server" CssClass="label_list"> <%#Container.DataItem%></asp:Label>
                        </div>
                    </ItemTemplate>
                </asp:DataList>
            </li>
            <li>
                <asp:DataList ID="List_BuddyList" runat="server">
                    <HeaderTemplate>
                        <asp:Label ID="Label_BuddyListT" meta:resourcekey="lblBuddyList" runat="server" CssClass="label_title"></asp:Label>
                    </HeaderTemplate>
                    <ItemTemplate>
                        <div style="padding-left: 15%;">
                            <a href='<%# string.Format("/secure/userProfile.aspx?Nick={0}", Eval("Username")) %>'>
                                <%#DataBinder.Eval(Container.DataItem, "Username")%>
                            </a>
                        </div>
                    </ItemTemplate>
                </asp:DataList>
            </li>
        </ol>
    </div>
    <div id="Content_button">
      
        <asp:ImageButton ID="btn_change_profile" ImageUrl="~/master/resourcesNew/img/user_det_mod.png"
            PostBackUrl="EditProfile.aspx" meta:resourcekey="btnChangeProfile" runat="server" />
 
        <asp:ImageButton ID="btn_friends" ImageUrl="~/master/resourcesNew/img/ico_friends.png"
            PostBackUrl="MyFriends.aspx" meta:resourceKey="btnFriends" runat="server" />
       
        <asp:ImageButton ID="btn_add_friend" ImageUrl="~/master/resourcesNew/img/add_friends.png"
            OnClick="btn_add_friend_Click" meta:resourcekey="btnAddFriend" runat="server"
            Visible="false" />
       
        <asp:ImageButton ID="btn_ban_user" ImageUrl="~/master/resourcesNew/img/ban_user.png"
            OnClick="btn_ban_user_Click" meta:resourcekey="btnBanUser" runat="server" />
       
        <img src="../master/resourcesNew/img/ico_w_message.png" alt="invia messaggio" id="SendMess"
            meta:resourcekey="ltrSend" style="cursor: pointer;" runat="server" />
        <br />
        <br />
        <div id="statsMainContainer" style="width: 552px; margin: 0; height: 242px; margin-bottom: 20px;
            display: none">
            <div id="topLeftCorner">
            </div>
            <div id="topRightCorner">
            </div>
            <div id="bottomLeftCorner">
            </div>
            <div id="bottomRightCorner" style="z-index: 1; elevation: lower">
            </div>
            <div id="topBorder" style="width: 525px;">
            </div>
            <div id="bottomBorder" style="width: 525px;">
            </div>
            <div id="leftBorder" style="height: 212px">
            </div>
            <div id="rightBorder" style="height: 212px">
            </div>
            <asp:Panel CssClass="PanelSendPM " ScrollBars="Auto" ID="Panel1" runat="server" meta:resourcekey="PanelViewPMResource1"
                Width="550px">
                <div id="DivSendPM" style="width: 550px;">
                    <table>
                        <tr>
                            <td>
                                <asp:Label ID="Label2" runat="server" CssClass="label_title_sec" meta:resourcekey="lblSubject"
                                    Text="Oggetto : " Width="80"></asp:Label>
                            </td>
                            <td>
                                <asp:TextBox ID="TextBox_Subject" runat="server" meta:resourcekey="TextBoxTextMessResource1"
                                    Width="450px" />
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <asp:Label ID="Label3" runat="server" CssClass="label_title_sec" meta:resourcekey="lblText"
                                    Text="Text : " Width="80"></asp:Label>
                            </td>
                            <td>
                                <div style="float: right">
                                    <a class="ViewSmileys" style="font-weight: 800; cursor: pointer;">Smileys</a>
                                </div>
                                <div id="SmileysContent">
                                </div>
                                <asp:TextBox ID="TextBoxTextMess" runat="server" Height="91px" meta:resourcekey="TextBoxTextMessResource1"
                                    TextMode="MultiLine" Width="450px"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <th>
                            </th>
                            <th>
                                <!-- Option message -->
                                <div style="float: right">
                                    <asp:Button CssClass="button_generics" ID="ButtonSend" runat="server" Height="26px"
                                        OnClick="Btn_SendPM_Click" Text="Send" meta:resourcekey="btnSend" ValidationGroup="NickSendPM" />
                                    <asp:CheckBox ID="CheckBoxPriority2" Text="Priority" CssClass="label_title_sec" runat="server"
                                        meta:resourcekey="chbxPriority" />
                                </div>
                            </th>
                        </tr>
                    </table>
                </div>
            </asp:Panel>
        </div>
        <br />
        <br />
    </div>
</asp:Content>
